<template>
    <div id="alert">
        <div :class='{ "toast": showtoast == "nojianshen" }' v-if='showtoast == "nojianshen"'>
            无健身记录
        </div>
        <div :class='{ "toast": showtoast == "nomingxi" }' v-if='showtoast == "nomingxi"' :style = "'background-image: url('+$qiniu.url+'assets/img/toast.png)'">
            已经滑到底啦！
        </div>
    </div>
</template>
<script>
    export default {
        props: ['showtoast'],
        data() {
            return {
                // sonshowtoast: null,
            }
        },
        methods: {
            // sureShanchu() {
            //     this.$emit('sureShanchu');
            // },
            // quxiaoShanchu() {
            //     this.$emit('quxiaoShanchu');
            // },
            // plus() {
            //     this.$emit('plus');
            // },
            // hide() {
            //     this.$emit('hide');
            // },
            // deletes() {
            //     this.$emit('deletes');
            // },
            // write() {
            //     this.$emit('write');
            // }
        },
        watch: {
            showtoast(val) {
                this.sonshowtoast = val;
            },
        }

    }
</script>
<style>
    #alert {
        .toast {
            width: 40%;
            height: 40px;
            background-repeat: no-repeat;
            background-size: 100% 100%;
            position: fixed;
            top: 40%;
            left: 50%;
            -webkit-transform: translateX(-50%);
            text-align: center;
            font-size: 14px;
            color: rgba(253, 184, 17, 1);
            z-index: 999;
            border: 1px solid rgba(253, 184, 17, .6);
            line-height: 40px;
        }
    }
</style>